package com.flute.tools.sql;

import java.io.Serializable;

public class GroupBySQL implements ISQL,Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1558446713198103334L;
	private FieldsSQL fields;

	public GroupBySQL() {
		this.fields = new FieldsSQL();
	}

	public void addField(String field) {
		this.fields.addField(field);
	}

	@Override
	public String getSQLString() {
		if (fields.size() == 0) {
			return "";
		} else {
			return " group by " + fields.getSQLString() + SQLUtils.BLANK;
		}
	}

}
